home *** CD-ROM | disk | FTP | other *** search
/ Wild Blue Yonder 1: 50 Years of Gs & Jets / Wild Blue Yonder - Episode 1 - 50 Years of Gs and Jets (Digital Ranch) (Spectrum Holobyte)(1-107-40-101)(1994).iso / splash.dir / 00009_Script_9 < prev    next >
Text File  |  1994-08-29  |  5KB  |  231 lines

  1. on startMovie
  2.   global mooV
  3.   set the visibility of sprite mooV = 0
  4.   load
  5. end startMovie
  6.  
  7.  
  8.  
  9. on load
  10.   preLoadCast "DRlogo.mov", "WBY"
  11. end load
  12.  
  13.  
  14.  
  15. on playQT
  16.   global mooV, mooVCast, mooVVol, volumes
  17.   
  18.   set the movieTime  of sprite mooV     = 0
  19.   set the visibility of sprite mooV     = 1
  20.   set the volume     of sprite mooV     = volumes( mGet, mooVVol ) 
  21.   set the movieRate  of sprite mooV     = 1
  22.   
  23.   repeat while the movieRate of sprite mooV
  24.     updateStage
  25.   end repeat 
  26.   
  27.   set the visibility of sprite mooV = 0
  28. end playQT
  29.  
  30.  
  31.  
  32. on titleAudio
  33.   set the volume of sound 1 = 255
  34.   sound playFile 1, string("@:Audio:titles.aif")
  35.   startCutTimer
  36. end titleAudio
  37.  
  38.  
  39.  
  40. on startCutTimer
  41.   global cutStartTime
  42.   set cutStartTime = the timer
  43. end startCutTimer
  44.  
  45.  
  46.  
  47. on waitForFlyby
  48.   repeat while playTime() < 180
  49.   end repeat
  50. end waitForFlyby
  51.  
  52.  
  53.  
  54. on playTime
  55.   global cutStartTime
  56.   return the timer - cutStartTime
  57. end playTime
  58.  
  59.  
  60.  
  61. on waitForSoundEnd
  62.   repeat while soundBusy( 1 )
  63.   end repeat
  64. end waitForSoundEnd  
  65.  
  66.  
  67.  
  68. on launchProgram
  69.   global CDorHDroot
  70.   go to movie CDorHDroot & "Overview"
  71. end launchProgram
  72.  
  73.  
  74. ------------------------------------------------------------
  75. -- Handlers in this section control the ambient sound.
  76. -- They are stripped-down versions of the sound handlers
  77. -- used throughout the disk.  The names are the same, but
  78. -- in some cases a handler's name may seem unrelated to its
  79. -- function, because it is not required to do as much as it
  80. -- was originally designed to do.  (Crossfades and fade outs
  81. -- are not needed here, for example, because the next movie
  82. -- is launched before the sound finishes.)
  83. ------------------------------------------------------------
  84.  
  85. on initAmbience
  86.   global ambienceCode
  87.   
  88.   set ambienceCode = 1
  89.   -- Start the volumes at zero, so that later, when an era movie
  90.   -- starts, its chooseChannel handler will work properly.
  91.   set the volume of sound 1 = 0
  92.   set the volume of sound 2 = 0
  93.   countSounds 
  94.   startAmbience   
  95.   
  96. end initAmbience
  97.  
  98.  
  99.  
  100. on startAmbience
  101.   chooseChannels  
  102.   crossFade
  103. end startAmbience
  104.  
  105.  
  106.  
  107. on countSounds
  108.   global overviewSounds
  109.   set overviewSounds = 1
  110. end countSounds
  111.  
  112.  
  113.  
  114.  
  115. on chooseChannels
  116.   global inChannel, outChannel
  117.   set inChannel  = 2
  118.   set outChannel = 1
  119. end chooseChannels
  120.  
  121.  
  122.  
  123.  
  124. on crossFade
  125.   global inChannel, outChannel, fadeInLength 
  126.   
  127.   set temp = inChannel
  128.   set inChannel = outChannel
  129.   set outChannel = temp
  130.   
  131.   chooseCut
  132.   
  133.   initFadeIn( inChannel )
  134.   fadeIn( inChannel, fadeInLength )
  135.   playCut
  136. end crossFade
  137.  
  138.  
  139.  
  140. on checkAmbience
  141.   global fadedIn, inChannel, fadeInLength
  142.   if not fadedIn then fadeIn( inChannel, fadeInLength )
  143.   else go (the frame + 1)
  144.   -- This last line is new.  When the audio is fully faded in, 
  145.   -- the playback head advances so that the next movie will
  146.   -- start.
  147. end checkAmbience
  148.  
  149.  
  150.  
  151. on chooseCut
  152.   global cut
  153.   set cut = 1
  154. end chooseCut  
  155.  
  156.  
  157.  
  158.  
  159. on initFadeIn channel
  160.   global lastTimeIn, maxVol, volumes, bgVol, fracSumIn, fadedIn
  161.   set the volume of sound channel = 0  
  162.   set lastTimeIn                  = the timer
  163.   set maxVol                      = volumes( mGet, bgVol )
  164.   set fracSumIn                   = 0
  165.   set fadedIn                     = FALSE
  166. end initFadeIn
  167.  
  168.  
  169.  
  170.  
  171. on fadeIn channel, length
  172.   
  173.   global lastTimeIn, maxVol, fracSumIn, fadedIn, volumes, bgVol
  174.   
  175.   if the timer > lastTimeIn then
  176.     set elapsedTime = (the timer - lastTimeIn) * 1.0000000
  177.     set lastTimeIn = the timer
  178.     set increment = (elapsedTime/length) * maxVol
  179.     set increment = storeFractionIn( increment )
  180.     
  181.     if fracSumIn >= 1 then
  182.       set increment = increment + 1
  183.       set fracSumIn = fracSumIn - 1
  184.     end if
  185.     
  186.     if ((the volume of sound channel) + increment) < maxVol then
  187.       set the volume of sound channel = ¼
  188.         (the volume of sound channel) + increment
  189.     else
  190.       set the volume of sound channel = maxVol
  191.       set fadedIn = TRUE
  192.     end if
  193.     
  194.   end if
  195.   
  196. end fadeIn
  197.  
  198.  
  199.  
  200.  
  201. on storeFractionIn n
  202.   global fracSumIn
  203.   set int  = integer( n )
  204.   set frac = n - int
  205.   
  206.   if frac < 0 then
  207.     set frac = frac + 1
  208.     set int = int - 1
  209.   end if
  210.   
  211.   set fracSumIn = fracSumIn + frac
  212.   return int
  213. end storeFractionIn
  214.  
  215.  
  216.  
  217.  
  218. on playCut
  219.   global inChannel, ambience, CDroot, cut, Win
  220.   set selection = "wind.aif"
  221.   
  222.   if the machineType = Win then set soundPath = ¼
  223.     the pathname & "Audio\Ambience\" & selection )
  224.   else set soundPath = ¼
  225.     the pathname & "Audio:Ambience:" & selection )
  226.   
  227.   sound playFile inChannel, soundPath
  228.   startCutTimer
  229. end playCut
  230.  
  231.